package com.autonavi.yunda.yunji.core.utils;

import org.apache.commons.lang.StringUtils;

/**
 * Aone环境信息
 */
public class AoneUtil {
    public static String getAppName() {
        // Aone编译环境可以拿到环境变量，也可以在setenv中自行设置
        String aoneAppName = System.getenv("appName");
        if (StringUtils.isBlank(aoneAppName)) {
            aoneAppName = System.getenv("SIGMA_APP_NAME");
        }
        if (StringUtils.isBlank(aoneAppName)) {
            aoneAppName = System.getenv("ali_app_name");
        }
        return aoneAppName;
    }

    /**
     * 是否预发环境
     */
    public static boolean isPrepub() {
        String schemaName = System.getenv("envSign");
        return "staging".equals(schemaName);
    }

}
